package com.china08.yxyapi.rabbitmq.listener.swsstatistics;

import java.text.ParseException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.china08.yxyapi.service.sws.sws.impl.SwsWebsiteStatisticsMGImpl;

/**
 * 网站统计监听
 *
 */
@Component
@EnableRabbit
public class SwsStatisticsListener {

    public static final Logger LOGGER = LoggerFactory.getLogger(SwsStatisticsListener.class);

    @Autowired
    private SwsWebsiteStatisticsMGImpl swsStatisticsMGImpl;

    /**
     * 业务统计—网站统计
     * 
     * @param date
     * @throws ParseException
     */
    // @RabbitListener(queues = SwsStatisticsConfig.YW_SWS_SWS_STATISTICS)
    private void homeschoolStatisticsListener(Integer date) throws ParseException {
        swsStatisticsMGImpl.getZiXunCount(date);
        swsStatisticsMGImpl.getLanMuCount(date);
        swsStatisticsMGImpl.getLanMuMessage(date);
        swsStatisticsMGImpl.getKaiTongSchoolMonth(date);// 统计month之前,先补全
        swsStatisticsMGImpl.getKaiTongSchoolTotal(date);// 统计total之前,先补全
    }

}
